
{[assign var="in_item" value="`$result`"]}

<fieldset><legend>收入明细</legend>
{[include file="finance/in/item/_view.tpl"]}
</fieldset>

<fieldset><legend>成本信息</legend>
<table style="margin-top: 10px">
	<tr>
		<th width="40">序号</th>
		<th>流水号</th>
		<th>事由</th>
		<th>币种</th>
		<th>应付</th>
		<th>实付</th>
		<th>人民币</th>
		<th>付款日期</th>		
		<th>状态</th>
		<th>备注</th>
	</tr>
	{[foreach name=outer key=key item=item from=$result.item]} 
	{[assign var="no" value="`$key+1`"]} 
	{[assign var="t1" value="`$t1+$item.total`"]} 
	{[assign var="t2" value="`$t2+$item.amount`"]}
	{[assign var="t3" value="`$t3+$item.rmb`"]} 
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td>{[$no]}</td>
		<td>{[$item.id]}</td>
		<td>{[$item.out_x.name]}{[$item.name]}</td>
		<td>{[$item.currency_t]}</td>
		<td>{[$item.total|money]}</td>
		<td>{[$item.amount|money]}</td>
		<td>{[$item.rmb|money]}</td>
		<td>{[$item.date]}</td>
		<td>{[$item.status_t]}</td>
		<td id="item_content_{[$no]}">{[$item.content|truncate:21:"...":true]}</td>		
	</tr>
	{[/foreach]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td colspan="3"></td>
		<td>合计</td>
		<td>{[$t1|money]}</td>
		<td>{[$t2|money]}</td>
		<td>{[$t3|money]}</td>
		<td colspan="3"></td>
	</tr>
</table>
</fieldset>

<fieldset><legend>收入信息</legend>
<table>
	<tr>		
		<td align="right">流水号：</td>
		<td>{[$in.id]}（{[$in.emp_t]}）</td>
		<td align="right">日期：</td>
		<td>{[$in.date]}</td>
	</tr>
	<tr>
		<td align="right">产品：</td>
		<td colspan="3">{[$in.mold_t]}</td>
	</tr>
	<tr>
		<td width="20%" align="right">事由：</td>
		<td width="80%" colspan="3">{[$in.name]}</td>
	</tr>
	<tr>
		<td align="right">客户：</td>
		<td colspan="3">{[$in.supplier_x->fullname]}</td>
	</tr>	
	<tr>
		<td align="right">金额：</td>
		<td colspan="3">（大写）{[$in.currency_t]} {[$in.amount|rmb]} （小写）{[$in.currency]} {[$in.amount|money]}</td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3">{[$in.content]}</td>
	</tr>
</table>
</fieldset>

<fieldset><legend>银行信息</legend>
{[include file="finance/transaction/_view.tpl"]}	
</fieldset>
